package com.atheima.apis.article.fallback;


import com.atheima.apis.article.saveArticle;
import com.heima.model.article.dtos.articleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * feign失败配置
 * @author itheima
 */
@Component
public class IArticleClientFallback implements saveArticle {
    @PostMapping("/api/v1/article/save")
    @Override
    public ResponseResult saveArticle(articleDto dto)  {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取数据失败");
    }
}